//  创建整个应用路由器
import vueRouter from "vue-router";
import Home from '../pages/Home.vue'
import About from '../pages/About.vue'
import News from "@/pages/News.vue";
import Messages from "@/pages/Message.vue";
import Details from "@/pages/Detail.vue";

export default new vueRouter({
    routes: [
        {
            path: '/about',
            component: About
        },
        {
            path: '/home',
            component: Home,
            children: [
                {
                    path: 'news',
                    component: News
                },
                {
                    path: 'messages',
                    component: Messages,
                    children: [
                        {
                            path: 'detail',
                            component: Details
                        }
                    ]
                },

            ]
        },

    ]

})


